package com.zjp.mapper;

import com.zjp.vo.InoculationHistory2;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface InoculationHistoryMapper2 {


    /**
     * 通过用户ID查询接种记录
     */
    @Select("select i.historyId,v.vaccinesName,i.Num,s.InoculationName,i.inoculationTime\n" +
            "from zjp.inoculation_history i\n" +
            "         left join zjp.vaccines v\n" +
            "                   on i.vaccinesId=v.vaccinesId\n" +
            "         left join zjp.inoculation_site s\n" +
            "                   on s.InoculationId=i.InoculationId\n" +
            "where i.UserId=#{UserId}")
    List<InoculationHistory2> findAllInoculationHistory(long UserId);
}
